package gopi.labs.Connector;

import gopi.labs.exceptions.InValidIdentifier;

import java.util.ArrayList;
import java.util.List;

public class CloudCommunicationDevice {

	private String ccdId;
	
	private List<Device> devices;

	public CloudCommunicationDevice(String ccdId) {
		this.ccdId = ccdId;
		this.devices = new ArrayList<Device>();
	}

	public void addDevice(Device device)
	{
		this.devices.add(device);
	}
	public String getCcdId() {
		return ccdId;
	}

	public void validate() throws InValidIdentifier
	{
		if(this.ccdId == null) throw new InValidIdentifier("null");
		
	}
	public void setCcdId(String ccdId) {
		this.ccdId = ccdId;
	}

	public List<Device> getDevices() {
		return devices;
	}

	public void setDevices(List<Device> devices) {
		this.devices = devices;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	@Override
	public String toString() {
		return "CloudCommunicationDevice [ccdId=" + ccdId + ", devices="
				+ devices + "]";
	}
}
